The Fruit fly Optimization Algorithm (FOA) was widely used in all kinds of optimization problems as a new kind of optimization search algorithm. In order to overcome the shortcomings of low precision, easily trapping in local optimum and the slow convergence in later period, a novel algorithm of FOA based on Cellular Automata (CAFOA) was proposed. CAFOA used cellular evolution rules to select the best individual drosophila neighborhood during the first evolution, then it selected the location of individual fruit fly to conduct random perturbation and replaced the previous location before evolution with its neigborhood's, so it could obtain the value of secondary optimization, jump out of local extremum and continue to optimize. Experiments were conducted on the six kinds of classical test functions for operation simulation. The experimental results show that, the average convergence precision of the proposed algorithm is 10% higher than the traditional algorithm's and the average number of iterations to achieve stable global optimal values is reduced to 870, which demonstrates the effectiveness of the new algorithm.